package com.carkeeper.servcieManagement.controller;

import com.carkeeper.common.utils.Result;
import com.carkeeper.common.utils.StatusCode;
import com.carkeeper.servcieManagement.service.ServiceDetailService;
import com.carkeeper.serviceManagement.pojo.ServiceDetail;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author pengjinxiong
 * @version 1.0
 * @date 2020/11/25 14:57
 */
/*查询详情*/
@RestController
@RequestMapping("/serviceDetail")
public class ServiceDetailController {
    @Autowired
    private ServiceDetailService serviceDetailService;

    @GetMapping("/findByDetailId/{detailId}")
    public Result findByDetailId(@PathVariable("detailId") Long detailId) {
        ServiceDetail serviceDetail = serviceDetailService.findByDetailId(detailId);
        return new Result(true, StatusCode.OK,"查询详情成功",serviceDetail);

    }

}
